package(default_visibility = ["//visibility:public"])

config_setting(
    name = "use_pre_cxx11_abi",
    values = {
        "define": "abi=pre_cxx11_abi",
    }
)

cc_binary(
    name = "trtorchc",
    srcs = [
        "main.cpp"
    ],
    deps = [
        "//third_party/args",
        "//cpp/api:trtorch"
    ] + select({
        ":use_pre_cxx11_abi":  [
            "@libtorch_pre_cxx11_abi//:libtorch",
            "@libtorch_pre_cxx11_abi//:caffe2",
        ],
        "//conditions:default":  [
            "@libtorch//:libtorch",
            "@libtorch//:caffe2",
        ],
    }),
)